const Service = require("../../services");

module.exports = {
  name: "applys",

  async get_applys(ctx) {
    ctx.body = await Service.service.applys.get_applys(ctx.query);
  },

  async get_apply_cal(ctx) {
    ctx.body = await Service.service.applys.get_apply_cal(ctx.query.d_id);
  },

  async add(ctx) {
    ctx.body = await Service.service.applys.add(ctx.request.body);
  },

  async update(ctx) {
    ctx.body = await Service.service.applys.update(ctx.request.body);
  },

  async del(ctx) {
    ctx.body = await Service.service.applys.del_apply(ctx.request.body);
  },
};
